package com.prs.crm.domain.assets;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.approval.Application;
@Entity
@Table(name="ass_smallclass")
public class AssetsSmallClass extends BaseEntity{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private int id;
	private String name;
	private String canzhi;
	private String zjnx;
	private String remark;
	@ManyToOne
	private AssetsBigClass assetsBigClass;
	
	@OneToMany(fetch=FetchType.LAZY,mappedBy="assetsSmallClass")
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
	private Set<Application> application;
	public Set<Application> getApplication() {
		return application;
	}
	public void setApplication(Set<Application> application) {
		this.application = application;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCanzhi() {
		return canzhi;
	}
	public void setCanzhi(String canzhi) {
		this.canzhi = canzhi;
	}
	public String getZjnx() {
		return zjnx;
	}
	public void setZjnx(String zjnx) {
		this.zjnx = zjnx;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public AssetsBigClass getAssetsBigClass() {
		return assetsBigClass;
	}
	public void setAssetsBigClass(AssetsBigClass assetsBigClass) {
		this.assetsBigClass = assetsBigClass;
	}
	
}
